﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDbSweepOptions : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbSweepOptions(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbSweepOptions obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbSweepOptions()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDbSweepOptions(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdDbSweepOptions() : this(TD_DbPINVOKE.new_OdDbSweepOptions__SWIG_0(), true)
		{
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbSweepOptions(OdDbSweepOptions src) : this(TD_DbPINVOKE.new_OdDbSweepOptions__SWIG_1(OdDbSweepOptions.getCPtr(src)), true)
		{
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbSweepOptions Assign(OdDbSweepOptions src)
		{
			OdDbSweepOptions result = new OdDbSweepOptions(TD_DbPINVOKE.OdDbSweepOptions_Assign(this.swigCPtr, OdDbSweepOptions.getCPtr(src)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double draftAngle()
		{
			double result = TD_DbPINVOKE.OdDbSweepOptions_draftAngle(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDraftAngle(double ang)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setDraftAngle(this.swigCPtr, ang);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double startDraftDist()
		{
			double result = TD_DbPINVOKE.OdDbSweepOptions_startDraftDist(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setStartDraftDist(double val)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setStartDraftDist(this.swigCPtr, val);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double endDraftDist()
		{
			double result = TD_DbPINVOKE.OdDbSweepOptions_endDraftDist(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setEndDraftDist(double val)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setEndDraftDist(this.swigCPtr, val);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double twistAngle()
		{
			double result = TD_DbPINVOKE.OdDbSweepOptions_twistAngle(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTwistAngle(double ang)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setTwistAngle(this.swigCPtr, ang);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double scaleFactor()
		{
			double result = TD_DbPINVOKE.OdDbSweepOptions_scaleFactor(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setScaleFactor(double val)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setScaleFactor(this.swigCPtr, val);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double alignAngle()
		{
			double result = TD_DbPINVOKE.OdDbSweepOptions_alignAngle(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setAlignAngle(double ang)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setAlignAngle(this.swigCPtr, ang);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbSweepOptions.AlignOption align()
		{
			OdDbSweepOptions.AlignOption result = (OdDbSweepOptions.AlignOption)TD_DbPINVOKE.OdDbSweepOptions_align(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setAlign(OdDbSweepOptions.AlignOption val)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setAlign(this.swigCPtr, (int)val);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbSweepOptions.MiterOption miterOption()
		{
			OdDbSweepOptions.MiterOption result = (OdDbSweepOptions.MiterOption)TD_DbPINVOKE.OdDbSweepOptions_miterOption(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setMiterOption(OdDbSweepOptions.MiterOption val)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setMiterOption(this.swigCPtr, (int)val);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool alignStart()
		{
			bool result = TD_DbPINVOKE.OdDbSweepOptions_alignStart(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setAlignStart(bool val)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setAlignStart(this.swigCPtr, val);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePoint3d basePoint()
		{
			OdGePoint3d result = new OdGePoint3d(TD_DbPINVOKE.OdDbSweepOptions_basePoint(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBasePoint(OdGePoint3d pnt)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setBasePoint(this.swigCPtr, OdGePoint3d.getCPtr(pnt));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool bank()
		{
			bool result = TD_DbPINVOKE.OdDbSweepOptions_bank(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBank(bool val)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setBank(this.swigCPtr, val);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool checkIntersections()
		{
			bool result = TD_DbPINVOKE.OdDbSweepOptions_checkIntersections(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setCheckIntersections(bool val)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setCheckIntersections(this.swigCPtr, val);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeVector3d twistRefVec()
		{
			OdGeVector3d result = new OdGeVector3d(TD_DbPINVOKE.OdDbSweepOptions_twistRefVec(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTwistRefVec(OdGeVector3d vec)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setTwistRefVec(this.swigCPtr, OdGeVector3d.getCPtr(vec));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool getSweepEntityTransform(OdGeMatrix3d mat)
		{
			bool result = TD_DbPINVOKE.OdDbSweepOptions_getSweepEntityTransform(this.swigCPtr, OdGeMatrix3d.getCPtr(mat));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setSweepEntityTransform(OdGeMatrix3d mat)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setSweepEntityTransform__SWIG_0(this.swigCPtr, OdGeMatrix3d.getCPtr(mat));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdResult setSweepEntityTransform(OdDbEntityPtrArray sweepEntities, bool displayErrorMessages)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSweepOptions_setSweepEntityTransform__SWIG_1(this.swigCPtr, OdDbEntityPtrArray.getCPtr(sweepEntities), displayErrorMessages);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setSweepEntityTransform(OdDbEntityPtrArray sweepEntities)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSweepOptions_setSweepEntityTransform__SWIG_2(this.swigCPtr, OdDbEntityPtrArray.getCPtr(sweepEntities));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getPathEntityTransform(OdGeMatrix3d mat)
		{
			bool result = TD_DbPINVOKE.OdDbSweepOptions_getPathEntityTransform(this.swigCPtr, OdGeMatrix3d.getCPtr(mat));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setPathEntityTransform(OdGeMatrix3d mat)
		{
			TD_DbPINVOKE.OdDbSweepOptions_setPathEntityTransform__SWIG_0(this.swigCPtr, OdGeMatrix3d.getCPtr(mat));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdResult setPathEntityTransform(OdDbEntity pPathEnt, bool displayErrorMessages)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSweepOptions_setPathEntityTransform__SWIG_1(this.swigCPtr, OdDbEntity.getCPtr(pPathEnt), displayErrorMessages);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setPathEntityTransform(OdDbEntity pPathEnt)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSweepOptions_setPathEntityTransform__SWIG_2(this.swigCPtr, OdDbEntity.getCPtr(pPathEnt));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult checkSweepCurve(OdDbEntity pSweepEnt, out Planarity planarity, OdGePoint3d pnt, OdGeVector3d vec, out bool closed, out double approxArcLen, bool displayErrorMessages)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSweepOptions_checkSweepCurve__SWIG_0(this.swigCPtr, OdDbEntity.getCPtr(pSweepEnt), out planarity, OdGePoint3d.getCPtr(pnt), OdGeVector3d.getCPtr(vec), out closed, out approxArcLen, displayErrorMessages);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult checkSweepCurve(OdDbEntity pSweepEnt, out Planarity planarity, OdGePoint3d pnt, OdGeVector3d vec, out bool closed, out double approxArcLen)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSweepOptions_checkSweepCurve__SWIG_1(this.swigCPtr, OdDbEntity.getCPtr(pSweepEnt), out planarity, OdGePoint3d.getCPtr(pnt), OdGeVector3d.getCPtr(vec), out closed, out approxArcLen);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult checkPathCurve(OdDbEntity pPathEnt, bool displayErrorMessages)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSweepOptions_checkPathCurve__SWIG_0(this.swigCPtr, OdDbEntity.getCPtr(pPathEnt), displayErrorMessages);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult checkPathCurve(OdDbEntity pPathEnt)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSweepOptions_checkPathCurve__SWIG_1(this.swigCPtr, OdDbEntity.getCPtr(pPathEnt));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;

		public enum AlignOption
		{
			kNoAlignment,
			kAlignSweepEntityToPath,
			kTranslateSweepEntityToPath,
			kTranslatePathToSweepEntity
		}

		public enum MiterOption
		{
			kDefaultMiter,
			kOldMiter,
			kNewMiter,
			kCrimpMiter,
			kBendMiter
		}
	}
}
